import { Button, Grid, Icon, Space, Typography } from "@arco-design/web-react";
import "./index.less";
import HotApp from "@/components/HotApp";
import AppResult from "@/components/AppResult";
import { history } from "umi";
import withAuth from "@/hocs/withAuth";
import { ICONFONT_URL } from "@/constant/common";
import WebsiteStatistic from "@/components/WebsiteStatistic";
export default withAuth(() => {
  const IconFont = Icon.addFromIconFontCn({
    src: ICONFONT_URL,
  });
  return (
    <div className="analysisPage">
      <Grid.Row
        align="center"
        justify="center"
        style={{ background: "#fff", marginBottom: "10px" }}
      >
        <Grid.Col flex={1}>
          <Button
            type="text"
            icon={<IconFont type="icon-shouye" />}
            style={{ marginLeft: "10px" }}
            onClick={() => history.push("/")}
          >
            首页
          </Button>
        </Grid.Col>
        <Grid.Col flex="auto">
          <Typography.Title
            style={{
              color: "#000",
              fontWeight: "bold",
              margin: 0,
              padding: "10px",
            }}
          >
            数据统计
          </Typography.Title>
        </Grid.Col>
      </Grid.Row>
      <Grid.Row justify="space-around">
        <Grid.Col md={11} sm={12} xs={24}>
          <HotApp />
        </Grid.Col>
        <Grid.Col md={11} sm={12} xs={24}>
          <AppResult />
        </Grid.Col>
      </Grid.Row>
      <div style={{ padding: "10px" }}>
        <Grid.Row
          align="center"
          justify="center"
          style={{
            background: "#fff",
            marginTop: "10px",
            borderRadius: "10px",
          }}
        >
          <WebsiteStatistic />
        </Grid.Row>
      </div>
    </div>
  );
});
